package com.zoshine.zzg.pojo.pojostatus;

import java.util.Objects;

/**
 * 发放单状态枚举
 *
 * @author 田沛凌
 * @time 2017/6/20 17:42
 */
public enum ReleaseSlipStatus {
    PENDING_RELEASE(0, "待发放"),
    FINISH(1, "发放完成");

    private int value;
    private String desc;
    ReleaseSlipStatus(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public static String getDesc(Integer value) {
        for (ReleaseSlipStatus menuStatus : ReleaseSlipStatus.values()) {
            if (Objects.equals(menuStatus.value, value)) {
                return menuStatus.desc;
            }
        }
        return null;
    }
}
